	var verifyCode = new GVerify("LAY-user-get-vercode");//生成图形验证码
	layui.use(['form','layer','jquery'],function(){
		var form = layui.form,
		layer = layui.layer,
		$ = layui.$;
		
		form.on('submit(LAY-user-forget-submit)',function(data){
			//获取表单
			var field = data.field;
			cellphone = field.cellphone,				//手机号
			imgvercode = field.imgvercode,				//图形验证码
			msgvercode = field.msgvercode;				//短信验证码
			
		    //校验图形验证码
			var res = verifyCode.validate(imgvercode);
			if(!res){
				layer.msg('图形验证码错误',{icon:5});
				return false;
			}
			
			//发送请求
			$.ajax({
				type:"",
				url:urlHead + "",
				async:true,
				data:{
					"":cellphone,
					"":msgvercode
				},
				success:function(res){
					if(res.code==0){
						location.href = "reset_password.html";
					}else{
						layer.msg('找回密码失败',{icon:5});
					}
				},
				error:function(){
					layer.msg('找回密码失败',{icon:5});
				},
				dataType:"json"
			});
			
			return false;
		});
		
	});